<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>ECharts</title>
        <!-- 引入 echarts.js -->
        <script src="echarts.min.js"></script>
        </head>
        <body>
        <!-- 为ECharts准备一个具备大小（宽高）的Dom -->
        <div id="main" style="width: 600px;height:400px;"></div>
        <script type="text/javascript">
        // 基于准备好的dom，初始化echarts实例
        var myChart = echarts.init(document.getElementById('main'));
 
        // 指定图表的配置项和数据
        var option = {
        		  title: {
        			    text: 'Stacked Line'
        			  },
        			  tooltip: {
        			    trigger: 'axis'
        			  },
        			  legend: {
        			    data: ['man', 'woman']
        			  },
        			  grid: {
        			    left: '3%',
        			    right: '2%',
        			    bottom: '3%',
        			    containLabel: true
        			  },
        			  toolbox: {
        			    feature: {
        			      saveAsImage: {}
        			    }
        			  },
        			  xAxis: {
        			    type: 'category',
        			    boundaryGap: false,
        			    data: ['5月', '6月', '7月', '8月', '9月', '10月', '11月']
        			  },
        			  yAxis: {
        			    type: 'value'
        			  },
        			  series: [
        			    {
        			      name: 'man',
        			      type: 'line',
        			      stack: 'Total',
        			      data: [79743, 105608, 94432, 96429, 122671, 147016, 450283]
        			    },
        			    {
        			      name: 'woman',
        			      type: 'line',
        			      stack: 'Total',
        			      data: [79742, 104751, 94390, 96864, 122591, 147016, 452137]
        			    }
        			  ]
        			};



        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);
        </script>
    </body>
</html>